Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15] Fix memory limit check bytes to GB conversion (backport #13838) #13876

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 13, 2024

Motivation/summary

This PR closed the issue #13837, by fixing the bytes to GB conversion in the fallback memory check.

Checklist

Update CHANGELOG.asciidoc

  • Documentation has been updated

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

The easiest way to test this change is to create a custom cgroup with a memory limit that is larger than the total system memory, then start apm-server binary with the created cgroup. Observer APM Server logs for "cgroup memory limit exceed available memory, falling back to the total system memory".

cgcreate  -g memory:apm_test
cgget -r memory.limit_in_bytes=10737418240 /apm_test
cgexec -g memory:apm_test ./apm-server run

Related issues

Changelog

==== Bug fixes

Fixes the memory limit auto check conversion in beater runner, when cgroups memory limit was scaled to gigabytes while the total memory limit stayed in bytes. Additional tests coverage is added to better validate memory conversion logic.

(cherry picked from commit 6ad5821)
@mergify mergify bot requested a review from a team as a code owner August 13, 2024 17:55
@mergify mergify bot added the backport label Aug 13, 2024
@mergify mergify bot assigned 1pkg Aug 13, 2024
@mergify mergify bot merged commit 10496b0 into 8.15 Aug 13, 2024
12 checks passed
@mergify mergify bot deleted the mergify/bp/8.15/pr-13838 branch August 13, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants